Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> <div id="div1"> <p id="p1">This is a paragraph.</p> <p id="p2">This is another paragraph.</p> </div> <script> var parent = document.getElementById("div1"); var child = document.getElementById("p1"); parent.removeChild(child); </script> </body> <!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_dom_elementremove by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:36:38 GMT --> </html>
Result:
Try it Yourself - © w3schools.com